@import "_modules/_animation.less"; //动画&过渡 相关
@import "_modules/_animation_lib.less";//动画库
@import "_modules/_gradient.less"; //渐变
@import "_modules/_layout.less"; //布局
@import "_modules/_components.less";//组件类
@import "_variables.less";//公共变量
.wh(@w, @h) {
    width: @w/100 + 0rem;
    height: @h/100 + 0rem;
}
.xCenter() {
    left: 50%;
    .translate3d(-50%,0,0);
}
.yCenter() {
    top: 50%;
    .translate3d(0,-50%,0);
}
.x(@arg){
    .translate3d(@arg / 100 + 0rem,0,0);
}
.y(@arg){
    .translate3d(0,@arg / 100 + 0rem,0);
}
.z(@arg){
    .translate3d(0,0,@arg / 100 + 0rem);
}
.3d(@x,@y,@z){
    .translate3d(@x / 100 + 0rem,@y / 100 + 0rem,@z / 100 + 0rem);
}
.2d(@x,@y) {
    .translate(@x / 100 + 0rem, @y / 100 + 0rem)
}
.xyCenter() {
    top: 50%;
    left: 50%;
    .translate3d(-50%,-50%,0);
}
.abCenter(@w, @h) {
    @w_: @w / 100;
    @h_: @h / 100;
    width: @w_ + 0rem;
    height: @h_ + 0rem;
    left: 50%;
    top: 50%;
    margin-left: @w_ / -2 + 0rem;
    margin-top: @h_ / -2 + 0rem;
    position: absolute;
}
.ac(@w, @h){
   .abCenter(@w, @h) ;
};
.animate() {
    animation-play-state: paused;
    &.active {
        animation-play-state: running;
    }
}
.time(@arg){
    .transition-duration(@duration:@arg);
}
.wait(@arg){
    .transition-delay(@delay:@arg);
}
.bg() {
    background-repeat: no-repeat;
    background-position: center center;
    .background-size(contain);
}
.bg(@arg) when(@arg=1) {
    background-repeat: no-repeat;
    background-position: center center;
    .background-size(cover);
}
// 文本溢出省略号
/**** DEMO
单行
.text-overflow-ellipsis(1);
多行
 .text-overflow-ellipsis(2);
****/
.text-overflow-ellipsis(@line) when(@line=1) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.text-overflow-ellipsis(@line) when(@line>1) {
    overflow: hidden;
    display: -webkit-box;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: @line;
    word-break: break-all;
}
/**** DEMO
.box-shadow(2px 2px 3px #aaaaaa);
****/
.box-shadow(@arg) {
    .pre(box-shadow;@arg);
}
// border
.border-color(@arg) {
    .pre(border-color,@arg);
}
.border-image(@arg) {
    .pre(border-image,@arg);
}
.border-radius(@arg) {
    .pre(border-radius,@arg);
}
//background
.background-origin(@arg) {
    .pre(background-origin,@arg);
}
.background-clip(@arg) {
    .pre(background-clip,@arg);
}
.background-size(@arg) {
    .pre(background-size,@arg);
}
//box
.box-shadow(@arg) {
    .pre(box-shadow,@arg);
}
.box-sizing(@arg) {
    .pre(box-sizing,@arg);
}



.g-clr() {
    zoom: 1;
    &:after {
        display: block;
        clear: both;
        height: 0;
        content: "\0020";
    }
}